Integrand size = 13, antiderivative size = 53 \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=\frac {a \text {arctanh}(\cos (x))}{b^2}+\frac {\sqrt {a^2+b^2} \text {arctanh}\left (\frac {(b-a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{b^2}-\frac {\csc (x)}{b} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3591, 3567, 3855, 3590, 212} \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=\frac {\sqrt {a^2+b^2} \text {arctanh}\left (\frac {\sin (x) (b-a \cot (x))}{\sqrt {a^2+b^2}}\right )}{b^2}+\frac {a \text {arctanh}(\cos (x))}{b^2}-\frac {\csc (x)}{b} \]
[In]
[Out]
Rule 212
Rule 3567
Rule 3590
Rule 3591
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\frac {\int (a-b \cot (x)) \csc (x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\csc (x)}{a+b \cot (x)} \, dx}{b^2} \\ & = -\frac {\csc (x)}{b}-\frac {a \int \csc (x) \, dx}{b^2}-\frac {\left (a^2+b^2\right ) \text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,(-b+a \cot (x)) \sin (x)\right )}{b^2} \\ & = \frac {a \text {arctanh}(\cos (x))}{b^2}+\frac {\sqrt {a^2+b^2} \text {arctanh}\left (\frac {(b-a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{b^2}-\frac {\csc (x)}{b} \\ \end{align*}
Time = 0.34 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.26 \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=\frac {2 \sqrt {a^2+b^2} \text {arctanh}\left (\frac {-a+b \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )-b \csc (x)+a \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )}{b^2} \]
[In]
[Out]
Time = 0.37 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.53
method | result | size |
default | \(-\frac {\tan \left (\frac {x}{2}\right )}{2 b}-\frac {1}{2 b \tan \left (\frac {x}{2}\right )}-\frac {a \ln \left (\tan \left (\frac {x}{2}\right )\right )}{b^{2}}+\frac {\left (-4 a^{2}-4 b^{2}\right ) \operatorname {arctanh}\left (\frac {-2 b \tan \left (\frac {x}{2}\right )+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{2 b^{2} \sqrt {a^{2}+b^{2}}}\) | \(81\) |
risch | \(-\frac {2 i {\mathrm e}^{i x}}{b \left ({\mathrm e}^{2 i x}-1\right )}-\frac {a \ln \left ({\mathrm e}^{i x}-1\right )}{b^{2}}+\frac {a \ln \left ({\mathrm e}^{i x}+1\right )}{b^{2}}-\frac {i \sqrt {-a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}+\frac {\left (i a +b \right ) \sqrt {-a^{2}-b^{2}}}{a^{2}+b^{2}}\right )}{b^{2}}+\frac {i \sqrt {-a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}-\frac {\left (i a +b \right ) \sqrt {-a^{2}-b^{2}}}{a^{2}+b^{2}}\right )}{b^{2}}\) | \(160\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 135 vs. \(2 (51) = 102\).
Time = 0.29 (sec) , antiderivative size = 135, normalized size of antiderivative = 2.55 \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=\frac {a \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) - a \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) + \sqrt {a^{2} + b^{2}} \log \left (-\frac {2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}}\right ) \sin \left (x\right ) - 2 \, b}{2 \, b^{2} \sin \left (x\right )} \]
[In]
[Out]
\[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=\int \frac {\csc ^{3}{\left (x \right )}}{a + b \cot {\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (51) = 102\).
Time = 0.30 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.02 \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=-\frac {a \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{b^{2}} - \frac {\sqrt {a^{2} + b^{2}} \log \left (\frac {a - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \sqrt {a^{2} + b^{2}}}{a - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{b^{2}} - \frac {\cos \left (x\right ) + 1}{2 \, b \sin \left (x\right )} - \frac {\sin \left (x\right )}{2 \, b {\left (\cos \left (x\right ) + 1\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 108 vs. \(2 (51) = 102\).
Time = 0.28 (sec) , antiderivative size = 108, normalized size of antiderivative = 2.04 \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=-\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{b^{2}} - \frac {\tan \left (\frac {1}{2} \, x\right )}{2 \, b} - \frac {\sqrt {a^{2} + b^{2}} \log \left (\frac {{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{b^{2}} + \frac {2 \, a \tan \left (\frac {1}{2} \, x\right ) - b}{2 \, b^{2} \tan \left (\frac {1}{2} \, x\right )} \]
[In]
[Out]
Time = 12.03 (sec) , antiderivative size = 170, normalized size of antiderivative = 3.21 \[ \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {b^3\,\cos \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}+4\,a^3\,\sin \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}+3\,a\,b^2\,\sin \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}+2\,a^2\,b\,\cos \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}}{4\,\sin \left (\frac {x}{2}\right )\,a^4+2\,\cos \left (\frac {x}{2}\right )\,a^3\,b+5\,\sin \left (\frac {x}{2}\right )\,a^2\,b^2+2\,\cos \left (\frac {x}{2}\right )\,a\,b^3+\sin \left (\frac {x}{2}\right )\,b^4}\right )\,\sqrt {a^2+b^2}}{b^2}-\frac {1}{b\,\sin \left (x\right )}-\frac {a\,\ln \left (\frac {\sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )}\right )}{b^2} \]
[In]
[Out]